g++ 7使用c++14 c++17高级特性

很多存量机器gcc和g++都是7.*的版本,如果想要编译一些使用了c++17高级特性的代码,如果想要不升级破坏相关环境,就需要使用TS
https://isocpp.org/std/status
https://stackoverflow.com/questions/21342077/what-is-c-technical-specification

1. filesystem

#filesystem
https://stackoverflow.com/questions/45867379/why-does-gcc-not-seem-to-have-the-filesystem-standard-library
https://stackoverflow.com/questions/60021128/c-experimental-filesystem-library-incomplete

// c++17
entry.is_regular_file()

//g++ 7
namespace fs = std::experimental::filesystem;
fs::is_regular_file(entry.status())
// compiler
g++ -lstdc++fs --std=c++11